<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>判断等级</title>
  <script language="javascript">
    function aa(x){
      var op1=parseInt(prompt("请输入成绩",x));
      if(op1>=90 && op1<=100){
        document.write("优秀");
      }
      else if(op1>=80 && op1<90){
        document.write("良好");
      }
      else if(op1>=70 && op1<80){
        document.write("中等");
      }
      else if(op1>=60 && op1<70){
        document.write("及格");
      } else {
        document.write("不及格");
      }
    }
  </script>
</head>

<body>
<input type="button" value="成绩判定" onClick="aa()"/>
</body>
</html>